#ifndef __PROGRAM_H__
#define __PROGRAM_H__

#include <GLES2/gl2.h>
#include <map>

typedef enum 
{
	IO_TYPE_ATTRIBUTE,
	IO_TYPE_UNIFORM
}io_type;

class Program
{
	private:
		GLuint id;
		GLint linked;
		char * log;

		std::map<const char *, GLint> shaders_io;

	public:
		Program();
		~Program();
		
		void load(GLuint vertexShader, GLuint fragmentShader);
		void addShaderIO(const char * io_string, io_type type);
		GLint getShaderIO(const char * io_string);
		void use();

		GLuint getID() { return id; }
		char * getLog() { return log; }


};
#endif // __PROGRAM_H__
